3.1330 \(\int \frac{\cot ^6(c+d x) \csc ^2(c+d x)}{a+b \sin (c+d x)} \, dx\)

Optimal. Leaf size=417 \[ -\frac{2 b^2 \left (a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{a^8 d}+\frac{\left (-161 a^4 b^2+245 a^2 b^4+15 a^6-105 b^6\right ) \cot (c+d x)}{105 a^7 d}-\frac{b \left (-30 a^4 b^2+40 a^2 b^4+5 a^6-16 b^6\right ) \tanh ^{-1}(\cos (c+d x))}{16 a^8 d}-\frac{\left (-60 a^2 b^2+35 a^4+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{\left (-13 a^2 b^2+8 a^4+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}-\frac{\left (-77 a^2 b^2+45 a^4+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}+\frac{b \left (-18 a^2 b^2+11 a^4+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d} \]

[Out]

(-2*b^2*(a^2 - b^2)^(5/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^8*d) - (b*(5*a^6 - 30*a^4*b^2 +
 40*a^2*b^4 - 16*b^6)*ArcTanh[Cos[c + d*x]])/(16*a^8*d) + ((15*a^6 - 161*a^4*b^2 + 245*a^2*b^4 - 105*b^6)*Cot[
c + d*x])/(105*a^7*d) + (b*(11*a^4 - 18*a^2*b^2 + 8*b^4)*Cot[c + d*x]*Csc[c + d*x])/(16*a^6*d) - ((45*a^4 - 77
*a^2*b^2 + 35*b^4)*Cot[c + d*x]*Csc[c + d*x]^2)/(105*a^5*d) - (Cot[c + d*x]*Csc[c + d*x]^3)/(3*b*d) + ((8*a^4
- 13*a^2*b^2 + 6*b^4)*Cot[c + d*x]*Csc[c + d*x]^3)/(24*a^4*b*d) + (a*Cot[c + d*x]*Csc[c + d*x]^4)/(4*b^2*d) -
((35*a^4 - 60*a^2*b^2 + 28*b^4)*Cot[c + d*x]*Csc[c + d*x]^4)/(140*a^3*b^2*d) + (b*Cot[c + d*x]*Csc[c + d*x]^5)
/(6*a^2*d) - (Cot[c + d*x]*Csc[c + d*x]^6)/(7*a*d)

________________________________________________________________________________________

Rubi [A]  time = 1.83261, antiderivative size = 417, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 7, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.241, Rules used = {2896, 3055, 3001, 3770, 2660, 618, 204} \[ -\frac{2 b^2 \left (a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )}{a^8 d}+\frac{\left (-161 a^4 b^2+245 a^2 b^4+15 a^6-105 b^6\right ) \cot (c+d x)}{105 a^7 d}-\frac{b \left (-30 a^4 b^2+40 a^2 b^4+5 a^6-16 b^6\right ) \tanh ^{-1}(\cos (c+d x))}{16 a^8 d}-\frac{\left (-60 a^2 b^2+35 a^4+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{\left (-13 a^2 b^2+8 a^4+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}-\frac{\left (-77 a^2 b^2+45 a^4+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}+\frac{b \left (-18 a^2 b^2+11 a^4+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d} \]

Antiderivative was successfully verified.

[In]

Int[(Cot[c + d*x]^6*Csc[c + d*x]^2)/(a + b*Sin[c + d*x]),x]

[Out]

(-2*b^2*(a^2 - b^2)^(5/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^8*d) - (b*(5*a^6 - 30*a^4*b^2 +
 40*a^2*b^4 - 16*b^6)*ArcTanh[Cos[c + d*x]])/(16*a^8*d) + ((15*a^6 - 161*a^4*b^2 + 245*a^2*b^4 - 105*b^6)*Cot[
c + d*x])/(105*a^7*d) + (b*(11*a^4 - 18*a^2*b^2 + 8*b^4)*Cot[c + d*x]*Csc[c + d*x])/(16*a^6*d) - ((45*a^4 - 77
*a^2*b^2 + 35*b^4)*Cot[c + d*x]*Csc[c + d*x]^2)/(105*a^5*d) - (Cot[c + d*x]*Csc[c + d*x]^3)/(3*b*d) + ((8*a^4
- 13*a^2*b^2 + 6*b^4)*Cot[c + d*x]*Csc[c + d*x]^3)/(24*a^4*b*d) + (a*Cot[c + d*x]*Csc[c + d*x]^4)/(4*b^2*d) -
((35*a^4 - 60*a^2*b^2 + 28*b^4)*Cot[c + d*x]*Csc[c + d*x]^4)/(140*a^3*b^2*d) + (b*Cot[c + d*x]*Csc[c + d*x]^5)
/(6*a^2*d) - (Cot[c + d*x]*Csc[c + d*x]^6)/(7*a*d)

Rule 2896

Int[cos[(e_.) + (f_.)*(x_)]^6*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)
, x_Symbol] :> Simp[(Cos[e + f*x]*(d*Sin[e + f*x])^(n + 1)*(a + b*Sin[e + f*x])^(m + 1))/(a*d*f*(n + 1)), x] +
 (Dist[1/(a^2*b^2*d^2*(n + 1)*(n + 2)*(m + n + 5)*(m + n + 6)), Int[(d*Sin[e + f*x])^(n + 2)*(a + b*Sin[e + f*
x])^m*Simp[a^4*(n + 1)*(n + 2)*(n + 3)*(n + 5) - a^2*b^2*(n + 2)*(2*n + 1)*(m + n + 5)*(m + n + 6) + b^4*(m +
n + 2)*(m + n + 3)*(m + n + 5)*(m + n + 6) + a*b*m*(a^2*(n + 1)*(n + 2) - b^2*(m + n + 5)*(m + n + 6))*Sin[e +
 f*x] - (a^4*(n + 1)*(n + 2)*(4 + n)*(n + 5) + b^4*(m + n + 2)*(m + n + 4)*(m + n + 5)*(m + n + 6) - a^2*b^2*(
n + 1)*(n + 2)*(m + n + 5)*(2*n + 2*m + 13))*Sin[e + f*x]^2, x], x], x] - Simp[(b*(m + n + 2)*Cos[e + f*x]*(d*
Sin[e + f*x])^(n + 2)*(a + b*Sin[e + f*x])^(m + 1))/(a^2*d^2*f*(n + 1)*(n + 2)), x] - Simp[(a*(n + 5)*Cos[e +
f*x]*(d*Sin[e + f*x])^(n + 3)*(a + b*Sin[e + f*x])^(m + 1))/(b^2*d^3*f*(m + n + 5)*(m + n + 6)), x] + Simp[(Co
s[e + f*x]*(d*Sin[e + f*x])^(n + 4)*(a + b*Sin[e + f*x])^(m + 1))/(b*d^4*f*(m + n + 6)), x]) /; FreeQ[{a, b, d
, e, f, m, n}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[2*m, 2*n] && NeQ[n, -1] && NeQ[n, -2] && NeQ[m + n + 5, 0]
 && NeQ[m + n + 6, 0] &&  !IGtQ[m, 0]

Rule 3055

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e +
 f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dis
t[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b
*c - a*d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - a*b*B + a^2*C) + (m + 1)*(b*
c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && Lt
Q[m, -1] && ((EqQ[a, 0] && IntegerQ[m] &&  !IntegerQ[n]) ||  !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&
  !IntegerQ[m]) || EqQ[a, 0])))

Rule 3001

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\cot ^6(c+d x) \csc ^2(c+d x)}{a+b \sin (c+d x)} \, dx &=-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc ^6(c+d x) \left (18 \left (35 a^4-60 a^2 b^2+28 b^4\right )-6 a b \left (7 a^2-2 b^2\right ) \sin (c+d x)-84 \left (6 a^4-10 a^2 b^2+5 b^4\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{504 a^2 b^2}\\ &=-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc ^5(c+d x) \left (-420 b \left (8 a^4-13 a^2 b^2+6 b^4\right )-12 a b^2 \left (10 a^2+7 b^2\right ) \sin (c+d x)+72 b \left (35 a^4-60 a^2 b^2+28 b^4\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{2520 a^3 b^2}\\ &=-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc ^4(c+d x) \left (288 b^2 \left (45 a^4-77 a^2 b^2+35 b^4\right )-36 a b^3 \left (25 a^2-14 b^2\right ) \sin (c+d x)-1260 b^2 \left (8 a^4-13 a^2 b^2+6 b^4\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{10080 a^4 b^2}\\ &=-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc ^3(c+d x) \left (-3780 b^3 \left (11 a^4-18 a^2 b^2+8 b^4\right )-36 a b^2 \left (120 a^4-133 a^2 b^2+70 b^4\right ) \sin (c+d x)+576 b^3 \left (45 a^4-77 a^2 b^2+35 b^4\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{30240 a^5 b^2}\\ &=\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc ^2(c+d x) \left (-576 b^2 \left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right )+36 a b^3 \left (285 a^4-574 a^2 b^2+280 b^4\right ) \sin (c+d x)-3780 b^4 \left (11 a^4-18 a^2 b^2+8 b^4\right ) \sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx}{60480 a^6 b^2}\\ &=\frac{\left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right ) \cot (c+d x)}{105 a^7 d}+\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\int \frac{\csc (c+d x) \left (3780 b^3 \left (5 a^6-30 a^4 b^2+40 a^2 b^4-16 b^6\right )-3780 a b^4 \left (11 a^4-18 a^2 b^2+8 b^4\right ) \sin (c+d x)\right )}{a+b \sin (c+d x)} \, dx}{60480 a^7 b^2}\\ &=\frac{\left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right ) \cot (c+d x)}{105 a^7 d}+\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}-\frac{\left (b^2 \left (a^2-b^2\right )^3\right ) \int \frac{1}{a+b \sin (c+d x)} \, dx}{a^8}+\frac{\left (b \left (5 a^6-30 a^4 b^2+40 a^2 b^4-16 b^6\right )\right ) \int \csc (c+d x) \, dx}{16 a^8}\\ &=-\frac{b \left (5 a^6-30 a^4 b^2+40 a^2 b^4-16 b^6\right ) \tanh ^{-1}(\cos (c+d x))}{16 a^8 d}+\frac{\left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right ) \cot (c+d x)}{105 a^7 d}+\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}-\frac{\left (2 b^2 \left (a^2-b^2\right )^3\right ) \operatorname{Subst}\left (\int \frac{1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^8 d}\\ &=-\frac{b \left (5 a^6-30 a^4 b^2+40 a^2 b^4-16 b^6\right ) \tanh ^{-1}(\cos (c+d x))}{16 a^8 d}+\frac{\left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right ) \cot (c+d x)}{105 a^7 d}+\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}+\frac{\left (4 b^2 \left (a^2-b^2\right )^3\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^8 d}\\ &=-\frac{2 b^2 \left (a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac{b+a \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{a^8 d}-\frac{b \left (5 a^6-30 a^4 b^2+40 a^2 b^4-16 b^6\right ) \tanh ^{-1}(\cos (c+d x))}{16 a^8 d}+\frac{\left (15 a^6-161 a^4 b^2+245 a^2 b^4-105 b^6\right ) \cot (c+d x)}{105 a^7 d}+\frac{b \left (11 a^4-18 a^2 b^2+8 b^4\right ) \cot (c+d x) \csc (c+d x)}{16 a^6 d}-\frac{\left (45 a^4-77 a^2 b^2+35 b^4\right ) \cot (c+d x) \csc ^2(c+d x)}{105 a^5 d}-\frac{\cot (c+d x) \csc ^3(c+d x)}{3 b d}+\frac{\left (8 a^4-13 a^2 b^2+6 b^4\right ) \cot (c+d x) \csc ^3(c+d x)}{24 a^4 b d}+\frac{a \cot (c+d x) \csc ^4(c+d x)}{4 b^2 d}-\frac{\left (35 a^4-60 a^2 b^2+28 b^4\right ) \cot (c+d x) \csc ^4(c+d x)}{140 a^3 b^2 d}+\frac{b \cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac{\cot (c+d x) \csc ^6(c+d x)}{7 a d}\\ \end{align*}

Mathematica [A]  time = 1.97261, size = 442, normalized size = 1.06 \[ \frac{-107520 b^2 \left (a^2-b^2\right )^{5/2} \tan ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )+b}{\sqrt{a^2-b^2}}\right )+3360 b \left (-30 a^4 b^2+40 a^2 b^4+5 a^6-16 b^6\right ) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )+3360 \left (-40 a^2 b^5+30 a^4 b^3-5 a^6 b+16 b^7\right ) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-2 a \cot (c+d x) \csc ^6(c+d x) \left (13860 a^3 b^3 \sin (c+d x)-7770 a^3 b^3 \sin (3 (c+d x))+1890 a^3 b^3 \sin (5 (c+d x))-1288 a^4 b^2 \cos (6 (c+d x))+1960 a^2 b^4 \cos (6 (c+d x))+8 \left (-1519 a^4 b^2+3115 a^2 b^4+225 a^6-1575 b^6\right ) \cos (2 (c+d x))+16 \left (329 a^4 b^2-665 a^2 b^4+45 a^6+315 b^6\right ) \cos (4 (c+d x))+8176 a^4 b^2-16240 a^2 b^4-5110 a^5 b \sin (c+d x)+2135 a^5 b \sin (3 (c+d x))-1155 a^5 b \sin (5 (c+d x))+120 a^6 \cos (6 (c+d x))+1200 a^6-8400 a b^5 \sin (c+d x)+4200 a b^5 \sin (3 (c+d x))-840 a b^5 \sin (5 (c+d x))-840 b^6 \cos (6 (c+d x))+8400 b^6\right )}{53760 a^8 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cot[c + d*x]^6*Csc[c + d*x]^2)/(a + b*Sin[c + d*x]),x]

[Out]

(-107520*b^2*(a^2 - b^2)^(5/2)*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]] + 3360*(-5*a^6*b + 30*a^4*b^3
- 40*a^2*b^5 + 16*b^7)*Log[Cos[(c + d*x)/2]] + 3360*b*(5*a^6 - 30*a^4*b^2 + 40*a^2*b^4 - 16*b^6)*Log[Sin[(c +
d*x)/2]] - 2*a*Cot[c + d*x]*Csc[c + d*x]^6*(1200*a^6 + 8176*a^4*b^2 - 16240*a^2*b^4 + 8400*b^6 + 8*(225*a^6 -
1519*a^4*b^2 + 3115*a^2*b^4 - 1575*b^6)*Cos[2*(c + d*x)] + 16*(45*a^6 + 329*a^4*b^2 - 665*a^2*b^4 + 315*b^6)*C
os[4*(c + d*x)] + 120*a^6*Cos[6*(c + d*x)] - 1288*a^4*b^2*Cos[6*(c + d*x)] + 1960*a^2*b^4*Cos[6*(c + d*x)] - 8
40*b^6*Cos[6*(c + d*x)] - 5110*a^5*b*Sin[c + d*x] + 13860*a^3*b^3*Sin[c + d*x] - 8400*a*b^5*Sin[c + d*x] + 213
5*a^5*b*Sin[3*(c + d*x)] - 7770*a^3*b^3*Sin[3*(c + d*x)] + 4200*a*b^5*Sin[3*(c + d*x)] - 1155*a^5*b*Sin[5*(c +
 d*x)] + 1890*a^3*b^3*Sin[5*(c + d*x)] - 840*a*b^5*Sin[5*(c + d*x)]))/(53760*a^8*d)

________________________________________________________________________________________

Maple [B]  time = 0.129, size = 952, normalized size = 2.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^6*csc(d*x+c)^8/(a+b*sin(d*x+c)),x)

[Out]

-1/64/d/a^4*tan(1/2*d*x+1/2*c)^4*b^3+1/24/d/a^5*tan(1/2*d*x+1/2*c)^3*b^4+2/d*b^8/a^8/(a^2-b^2)^(1/2)*arctan(1/
2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))+3/128/d/a*tan(1/2*d*x+1/2*c)^3-3/128/d/a/tan(1/2*d*x+1/2*c)^3-
15/128/d/a^2*tan(1/2*d*x+1/2*c)^2*b+11/16/d/a^3*b^2*tan(1/2*d*x+1/2*c)-11/16/d/a^3/tan(1/2*d*x+1/2*c)*b^2+15/1
28/d/a^2*b/tan(1/2*d*x+1/2*c)^2-15/8/d/a^4*b^3*ln(tan(1/2*d*x+1/2*c))+6/d/a^4/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*
tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))*b^4+5/128/d/a/tan(1/2*d*x+1/2*c)-5/128/d/a*tan(1/2*d*x+1/2*c)-1/896/d
/a/tan(1/2*d*x+1/2*c)^7+1/896/d/a*tan(1/2*d*x+1/2*c)^7-1/d/a^8*b^7*ln(tan(1/2*d*x+1/2*c))+1/2/d/a^7*b^6*tan(1/
2*d*x+1/2*c)-1/24/d/a^5/tan(1/2*d*x+1/2*c)^3*b^4-1/128/d/a*tan(1/2*d*x+1/2*c)^5+1/128/d/a/tan(1/2*d*x+1/2*c)^5
+5/16/d/a^2*b*ln(tan(1/2*d*x+1/2*c))-1/2/d/a^7/tan(1/2*d*x+1/2*c)*b^6-1/384/d/a^2*b*tan(1/2*d*x+1/2*c)^6-1/4/d
/a^4*b^3/tan(1/2*d*x+1/2*c)^2+5/2/d/a^6*b^5*ln(tan(1/2*d*x+1/2*c))+3/128/d/a^2*tan(1/2*d*x+1/2*c)^4*b-7/96/d/a
^3*tan(1/2*d*x+1/2*c)^3*b^2+1/4/d/a^4*tan(1/2*d*x+1/2*c)^2*b^3-9/8/d/a^5*b^4*tan(1/2*d*x+1/2*c)+7/96/d/a^3/tan
(1/2*d*x+1/2*c)^3*b^2+9/8/d/a^5/tan(1/2*d*x+1/2*c)*b^4-3/128/d/a^2*b/tan(1/2*d*x+1/2*c)^4-6/d*b^6/a^6/(a^2-b^2
)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))-1/8/d/a^6*tan(1/2*d*x+1/2*c)^2*b^5-2/d/a^2/(a
^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))*b^2+1/384/d/a^2*b/tan(1/2*d*x+1/2*c)^6+
1/64/d/a^4*b^3/tan(1/2*d*x+1/2*c)^4+1/8/d/a^6*b^5/tan(1/2*d*x+1/2*c)^2-1/160/d/a^3/tan(1/2*d*x+1/2*c)^5*b^2+1/
160/d/a^3*tan(1/2*d*x+1/2*c)^5*b^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^8/(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 5.28469, size = 3822, normalized size = 9.17 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^8/(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

[1/3360*(32*(15*a^7 - 161*a^5*b^2 + 245*a^3*b^4 - 105*a*b^6)*cos(d*x + c)^7 + 224*(58*a^5*b^2 - 100*a^3*b^4 +
45*a*b^6)*cos(d*x + c)^5 - 1120*(10*a^5*b^2 - 19*a^3*b^4 + 9*a*b^6)*cos(d*x + c)^3 + 1680*((a^4*b^2 - 2*a^2*b^
4 + b^6)*cos(d*x + c)^6 - a^4*b^2 + 2*a^2*b^4 - b^6 - 3*(a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^4 + 3*(a^4*b^
2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^2)*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) -
 a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*si
n(d*x + c) - a^2 - b^2))*sin(d*x + c) + 105*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7 - (5*a^6*b - 30*a^4*b^
3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^6 + 3*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^4 - 3*(5
*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^2)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 105*(5*a
^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7 - (5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^6 + 3*(5*a
^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^4 - 3*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d
*x + c)^2)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 3360*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*cos(d*x + c) - 70*(3
*(11*a^6*b - 18*a^4*b^3 + 8*a^2*b^5)*cos(d*x + c)^5 - 8*(5*a^6*b - 12*a^4*b^3 + 6*a^2*b^5)*cos(d*x + c)^3 + 3*
(5*a^6*b - 14*a^4*b^3 + 8*a^2*b^5)*cos(d*x + c))*sin(d*x + c))/((a^8*d*cos(d*x + c)^6 - 3*a^8*d*cos(d*x + c)^4
 + 3*a^8*d*cos(d*x + c)^2 - a^8*d)*sin(d*x + c)), 1/3360*(32*(15*a^7 - 161*a^5*b^2 + 245*a^3*b^4 - 105*a*b^6)*
cos(d*x + c)^7 + 224*(58*a^5*b^2 - 100*a^3*b^4 + 45*a*b^6)*cos(d*x + c)^5 - 1120*(10*a^5*b^2 - 19*a^3*b^4 + 9*
a*b^6)*cos(d*x + c)^3 + 3360*((a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^6 - a^4*b^2 + 2*a^2*b^4 - b^6 - 3*(a^4*
b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^4 + 3*(a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^2)*sqrt(a^2 - b^2)*arctan(-
(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c)))*sin(d*x + c) + 105*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 1
6*b^7 - (5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^6 + 3*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 1
6*b^7)*cos(d*x + c)^4 - 3*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^2)*log(1/2*cos(d*x + c) +
1/2)*sin(d*x + c) - 105*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7 - (5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*
b^7)*cos(d*x + c)^6 + 3*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^4 - 3*(5*a^6*b - 30*a^4*b^3
+ 40*a^2*b^5 - 16*b^7)*cos(d*x + c)^2)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 3360*(a^5*b^2 - 2*a^3*b^4 +
 a*b^6)*cos(d*x + c) - 70*(3*(11*a^6*b - 18*a^4*b^3 + 8*a^2*b^5)*cos(d*x + c)^5 - 8*(5*a^6*b - 12*a^4*b^3 + 6*
a^2*b^5)*cos(d*x + c)^3 + 3*(5*a^6*b - 14*a^4*b^3 + 8*a^2*b^5)*cos(d*x + c))*sin(d*x + c))/((a^8*d*cos(d*x + c
)^6 - 3*a^8*d*cos(d*x + c)^4 + 3*a^8*d*cos(d*x + c)^2 - a^8*d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**8/(a+b*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.23082, size = 1048, normalized size = 2.51 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^8/(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/13440*((15*a^6*tan(1/2*d*x + 1/2*c)^7 - 35*a^5*b*tan(1/2*d*x + 1/2*c)^6 - 105*a^6*tan(1/2*d*x + 1/2*c)^5 + 8
4*a^4*b^2*tan(1/2*d*x + 1/2*c)^5 + 315*a^5*b*tan(1/2*d*x + 1/2*c)^4 - 210*a^3*b^3*tan(1/2*d*x + 1/2*c)^4 + 315
*a^6*tan(1/2*d*x + 1/2*c)^3 - 980*a^4*b^2*tan(1/2*d*x + 1/2*c)^3 + 560*a^2*b^4*tan(1/2*d*x + 1/2*c)^3 - 1575*a
^5*b*tan(1/2*d*x + 1/2*c)^2 + 3360*a^3*b^3*tan(1/2*d*x + 1/2*c)^2 - 1680*a*b^5*tan(1/2*d*x + 1/2*c)^2 - 525*a^
6*tan(1/2*d*x + 1/2*c) + 9240*a^4*b^2*tan(1/2*d*x + 1/2*c) - 15120*a^2*b^4*tan(1/2*d*x + 1/2*c) + 6720*b^6*tan
(1/2*d*x + 1/2*c))/a^7 + 840*(5*a^6*b - 30*a^4*b^3 + 40*a^2*b^5 - 16*b^7)*log(abs(tan(1/2*d*x + 1/2*c)))/a^8 -
 26880*(a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*
x + 1/2*c) + b)/sqrt(a^2 - b^2)))/(sqrt(a^2 - b^2)*a^8) - (10890*a^6*b*tan(1/2*d*x + 1/2*c)^7 - 65340*a^4*b^3*
tan(1/2*d*x + 1/2*c)^7 + 87120*a^2*b^5*tan(1/2*d*x + 1/2*c)^7 - 34848*b^7*tan(1/2*d*x + 1/2*c)^7 - 525*a^7*tan
(1/2*d*x + 1/2*c)^6 + 9240*a^5*b^2*tan(1/2*d*x + 1/2*c)^6 - 15120*a^3*b^4*tan(1/2*d*x + 1/2*c)^6 + 6720*a*b^6*
tan(1/2*d*x + 1/2*c)^6 - 1575*a^6*b*tan(1/2*d*x + 1/2*c)^5 + 3360*a^4*b^3*tan(1/2*d*x + 1/2*c)^5 - 1680*a^2*b^
5*tan(1/2*d*x + 1/2*c)^5 + 315*a^7*tan(1/2*d*x + 1/2*c)^4 - 980*a^5*b^2*tan(1/2*d*x + 1/2*c)^4 + 560*a^3*b^4*t
an(1/2*d*x + 1/2*c)^4 + 315*a^6*b*tan(1/2*d*x + 1/2*c)^3 - 210*a^4*b^3*tan(1/2*d*x + 1/2*c)^3 - 105*a^7*tan(1/
2*d*x + 1/2*c)^2 + 84*a^5*b^2*tan(1/2*d*x + 1/2*c)^2 - 35*a^6*b*tan(1/2*d*x + 1/2*c) + 15*a^7)/(a^8*tan(1/2*d*
x + 1/2*c)^7))/d